<?php
namespace App\Admin\Extra\Form;

class TForm
{
    public static function mutilSelectItem($field, $value, $label, $api = null)
    {
        !$label && $label = $field;
        if (is_array($value)) {
            $value = json_encode($value);
        }
        $rtn = '       
        <div class="col-md-12 ty-mutilselect-box" data-attr="'.$field.'" data-count="" data-action_api="'.$api.'">
            <!--
            <div class="ty-mutilselect-item"></div>
            -->
            <div class="ty-mutilselect-item-hidden">
                <div class="ty-mutilselect-item" data-row_id="{{select_title_row_id}}">
                        <!--item name-->
                        <div class="col-md-5">  
        
                            <div class="form-group  ">
        
                                <div class="col-sm-10">
                            
                                    
                                    <div class="input-group">
                            
                                        <span class="input-group-addon"><i class="fa fa-pencil"></i></span>
                                        
                                        <input type="text" id="{{select_title_id}}" name="{{select_title_id}}" data-id="" value="" class="form-control title ty-mutilselect-item-title" placeholder="please Input text">
                                    </div>
                                
                                        
                                </div>
                            </div>
                        </div>
                        <!--item numberic-->
                        <div class="col-md-3" >
                            <div class="col-sm-1 ty-mutilselect-item-step-add"><a><span class="glyphicon glyphicon-plus" aria-hidden="true"></span></a></div>
                            <div class="col-sm-6">
                                    <input type="text" id="{{select_title_num}}" name="{{select_title_num}}" value="1" class="form-control ty-mutilselect-item-num" style="text-align:center; "  placeholder="Input 标题">
                            </div>
                            <div class="col-sm-1 ty-mutilselect-item-step-del"><span class="glyphicon glyphicon-minus" aria-hidden="true"></span></div>
                        </div>
                        <!--delete item-->
                        <div class="col-md-1 ty-mutilselect-item-del" ><a class=""><span class="glyphicon glyphicon-trash" aria-hidden="true"></span></a></div>
                </div>
                    
            </div>
            
            <!--add item-->
            <div class="ty-mutilselect-item" style=""><span class="col-sm-1"></span><a href="#" class="ty-mutilselect-item-add col-sm-2 "><span class="glyphicon glyphicon-plus" aria-hidden="true"></span></a></div>

            <div class="ty-mutilselect-item-panel" data-list="" data-list_tmp="">
                <ul>
                    
                </ul>
            </div>
            <div class="ty-mutilselect-item-data"><input name="'.$field.'" id="'.$field.'" type="hidden" value=\''.$value.'\'/></div>
        </div>
        ';
        return $rtn;
    }
}